﻿<%@ Page Title="" Language="C#" MasterPageFile="~/module/Fontend.Master" AutoEventWireup="true"
    CodeBehind="Article.aspx.cs" Inherits="mamnontuoitho7.module.Article" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div class="green">
        Trang chủ &raquo; Sức khỏe</div>
    <%

        for (int i = 0; i < _dt.Rows.Count; i++)
        {
    %>
    <div class="articles">
        <a href="ArticleDetails.aspx?ArticleID=<%=_dt.Rows[i]["ProductID"].ToString()%>">
            <img src="../images/article/<%=_dt.Rows[i]["Photo"].ToString() %>" alt="" />
            <h1 class="h1_green">
                <%= _general.CutString(_dt.Rows[i]["Title"].ToString(), 60)%></h1>
            <h2>
                <span class="postnews">Cập nhật ngày:<%= DateTime.Parse(_dt.Rows[i]["PostDate"].ToString()).ToString("dd/MM/yyyy HH:mm:ss")%></span><span
                    class="view">Lượt xem:<%=_dt.Rows[i]["ViewNumber"].ToString() %></span><span class="comment">Bình luận:<%= _comment.TotalCommentOfOneProduct(_dt.Rows[i]["ProductID"].ToString()).GetValueOrDefault() %></span></h2>
            <span></span>
            <p>
                <%= _general.CutString(_dt.Rows[i]["Introduce"].ToString(), 270)%></p>
        </a>
    </div>
    <%} %>
    <div id="container">
        <div class="pagination">

            <%if (_currentbar > 1)
              { %>
            <a href="Article.aspx?a=-1" class="pagegreen"><<</a>
            <%} %>
            <%  

                for (int j = _beginPage; j <= _endPage; j++)
                {
                    if (j == _pageflag)
                    {
            
            %>
            <a href="Article.aspx?page=<%= j%>" class="pagegreen active">
                <%= j%></a>
            <% }
                    else
                    { %>
            <a href="Article.aspx?page=<%= j%>" class="pagegreen">
                <%= j%></a>
            <%  }
                } %>


            <%if (_currentbar < _totalBars)
              { %>
            <a href="Article.aspx?a=1" class="pagegreen">>></a>
            <%} %>
        </div>
    </div>
</asp:Content>
